//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Evs service.
///
/// Amazon Elastic VMware Service (Amazon EVS) is a service that you can use to deploy a VMware Cloud Foundation (VCF) software environment directly on EC2 bare metal instances within an Amazon Virtual Private Cloud (VPC). Workloads running on Amazon EVS are fully compatible with workloads running on any standard VMware vSphere environment. This means that you can migrate any VMware-based workload to Amazon EVS without workload modification.
public struct Evs: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Evs client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "AmazonElasticVMwareService",
            serviceName: "Evs",
            serviceIdentifier: "evs",
            serviceProtocol: .json(version: "1.0"),
            apiVersion: "2023-07-27",
            endpoint: endpoint,
            errorType: EvsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates an Amazon EVS environment that runs VCF software, such as SDDC Manager, NSX Manager, and vCenter Server. During environment creation, Amazon EVS performs validations on DNS settings, provisions VLAN subnets and hosts, and deploys the supplied version of VCF. It can take several hours to create an environment. After the deployment completes, you can configure VCF according to your unique requirements.  You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironment action. This results in a ValidationException response.   EC2 instances created through Amazon EVS do not support associating an IAM instance profile.
    @Sendable
    @inlinable
    public func createEnvironment(_ input: CreateEnvironmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateEnvironmentResponse {
        try await self.client.execute(
            operation: "CreateEnvironment", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an Amazon EVS environment that runs VCF software, such as SDDC Manager, NSX Manager, and vCenter Server. During environment creation, Amazon EVS performs validations on DNS settings, provisions VLAN subnets and hosts, and deploys the supplied version of VCF. It can take several hours to create an environment. After the deployment completes, you can configure VCF according to your unique requirements.  You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironment action. This results in a ValidationException response.   EC2 instances created through Amazon EVS do not support associating an IAM instance profile.
    ///
    /// Parameters:
    ///   - clientToken:  This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.  A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
    ///   - connectivityInfo:  The connectivity configuration for the environment. Amazon EVS requires that you specify two route server peer IDs. During environment creation, the route server endpoints peer with the NSX edges over the NSX, providing BGP dynamic routing for overlay networks.
    ///   - environmentName: The name to give to your environment. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character, and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the environment in.
    ///   - hosts: The ESXi hosts to add to the environment. Amazon EVS requires that you provide details for a minimum of 4 hosts during environment creation. For each host, you must provide the desired hostname, EC2 SSH key, and EC2 instance type. Optionally, you can also provide a partition or cluster placement group to use, or use Amazon EC2 Dedicated Hosts.
    ///   - initialVlans: The initial VLAN subnets for the environment. You must specify a non-overlapping CIDR block for each VLAN subnet.
    ///   - kmsKeyId: A unique ID for the customer-managed KMS key that is used to encrypt the VCF credential pairs for SDDC Manager, NSX Manager, and vCenter appliances. These credentials are stored in Amazon Web Services Secrets Manager.
    ///   - licenseInfo: The license information that Amazon EVS requires to create an environment. Amazon EVS requires two license keys: a VCF solution key and a vSAN license key. VCF licenses must have sufficient core entitlements to cover vCPU core and vSAN storage capacity needs. VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments. VCF license information can be retrieved from the Broadcom portal.
    ///   - serviceAccessSecurityGroups: The security group that controls communication between the Amazon EVS control plane and VPC. The default security group is used if a custom security group isn't specified. The security group should allow access to the following.   TCP/UDP access to the DNS servers   HTTPS/SSH access to the host management VLAN subnet   HTTPS/SSH access to the Management VM VLAN subnet   You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.
    ///   - serviceAccessSubnetId: The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. Amazon EVS uses this subnet to validate mandatory DNS records for your VCF appliances and hosts and create the environment.
    ///   - siteId: The Broadcom Site ID that is allocated to you as part of your electronic software delivery. This ID allows customer access to the Broadcom portal, and is provided to you by Broadcom at the close of your software contract or contract renewal. Amazon EVS uses the Broadcom Site ID that you provide to meet Broadcom VCF license usage reporting requirements for Amazon EVS.
    ///   - tags: Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
    ///   - termsAccepted: Customer confirmation that the customer has purchased and maintains sufficient VCF software licenses to cover all physical processor cores in the environment, in compliance with VMware's licensing requirements and terms of use.
    ///   - vcfHostnames: The DNS hostnames for the virtual machines that host the VCF management appliances. Amazon EVS requires that you provide DNS hostnames for the following appliances: vCenter, NSX Manager, SDDC Manager, and Cloud Builder.
    ///   - vcfVersion:  The VCF version to use for the environment. Amazon EVS only supports VCF version 5.2.1 at this time.
    ///   - vpcId: A unique ID for the VPC that connects to the environment control plane for service access. Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available. The VPC that you select must have a valid DHCP option set with domain name, at least two DNS servers, and an NTP server. These settings are used to configure your VCF appliances and hosts. If you plan to use HCX over the internet, choose a VPC that has a primary CIDR block and a /28 secondary CIDR block from an IPAM pool. Make sure that your VPC also has an attached internet gateway. Amazon EVS does not support the following Amazon Web Services networking options for NSX overlay connectivity: cross-Region VPC peering, Amazon S3 gateway endpoints, or Amazon Web Services Direct Connect virtual private gateway associations.
    ///   - logger: Logger use during operation
    @inlinable
    public func createEnvironment(
        clientToken: String? = CreateEnvironmentRequest.idempotencyToken(),
        connectivityInfo: ConnectivityInfo,
        environmentName: String? = nil,
        hosts: [HostInfoForCreate],
        initialVlans: InitialVlans,
        kmsKeyId: String? = nil,
        licenseInfo: [LicenseInfo],
        serviceAccessSecurityGroups: ServiceAccessSecurityGroups? = nil,
        serviceAccessSubnetId: String,
        siteId: String,
        tags: [String: String]? = nil,
        termsAccepted: Bool,
        vcfHostnames: VcfHostnames,
        vcfVersion: VcfVersion,
        vpcId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateEnvironmentResponse {
        let input = CreateEnvironmentRequest(
            clientToken: clientToken, 
            connectivityInfo: connectivityInfo, 
            environmentName: environmentName, 
            hosts: hosts, 
            initialVlans: initialVlans, 
            kmsKeyId: kmsKeyId, 
            licenseInfo: licenseInfo, 
            serviceAccessSecurityGroups: serviceAccessSecurityGroups, 
            serviceAccessSubnetId: serviceAccessSubnetId, 
            siteId: siteId, 
            tags: tags, 
            termsAccepted: termsAccepted, 
            vcfHostnames: vcfHostnames, 
            vcfVersion: vcfVersion, 
            vpcId: vpcId
        )
        return try await self.createEnvironment(input, logger: logger)
    }

    /// Creates an ESXi host and adds it to an Amazon EVS environment. Amazon EVS supports 4-16 hosts per environment. This action can only be used after the Amazon EVS environment is deployed. All Amazon EVS hosts are created with the latest AMI release version for the respective VCF version of the environment. You can use the dedicatedHostId parameter to specify an Amazon EC2 Dedicated Host for ESXi host creation.  You can use the placementGroupId parameter to specify a cluster or partition placement group to launch EC2 instances into.  You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironmentHost action. This results in a ValidationException response.   EC2 instances created through Amazon EVS do not support associating an IAM instance profile.
    @Sendable
    @inlinable
    public func createEnvironmentHost(_ input: CreateEnvironmentHostRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateEnvironmentHostResponse {
        try await self.client.execute(
            operation: "CreateEnvironmentHost", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an ESXi host and adds it to an Amazon EVS environment. Amazon EVS supports 4-16 hosts per environment. This action can only be used after the Amazon EVS environment is deployed. All Amazon EVS hosts are created with the latest AMI release version for the respective VCF version of the environment. You can use the dedicatedHostId parameter to specify an Amazon EC2 Dedicated Host for ESXi host creation.  You can use the placementGroupId parameter to specify a cluster or partition placement group to launch EC2 instances into.  You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironmentHost action. This results in a ValidationException response.   EC2 instances created through Amazon EVS do not support associating an IAM instance profile.
    ///
    /// Parameters:
    ///   - clientToken:  This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.  A unique, case-sensitive identifier that you provide to ensure the idempotency of the host creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
    ///   - environmentId: A unique ID for the environment that the host is added to.
    ///   - host: The host that is created and added to the environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func createEnvironmentHost(
        clientToken: String? = CreateEnvironmentHostRequest.idempotencyToken(),
        environmentId: String,
        host: HostInfoForCreate,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateEnvironmentHostResponse {
        let input = CreateEnvironmentHostRequest(
            clientToken: clientToken, 
            environmentId: environmentId, 
            host: host
        )
        return try await self.createEnvironmentHost(input, logger: logger)
    }

    /// Deletes an Amazon EVS environment. Amazon EVS environments will only be enabled for deletion once the hosts are deleted. You can delete hosts using the DeleteEnvironmentHost action. Environment deletion also deletes the associated Amazon EVS VLAN subnets. Other associated Amazon Web Services resources are not deleted. These resources may continue to incur costs.
    @Sendable
    @inlinable
    public func deleteEnvironment(_ input: DeleteEnvironmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteEnvironmentResponse {
        try await self.client.execute(
            operation: "DeleteEnvironment", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an Amazon EVS environment. Amazon EVS environments will only be enabled for deletion once the hosts are deleted. You can delete hosts using the DeleteEnvironmentHost action. Environment deletion also deletes the associated Amazon EVS VLAN subnets. Other associated Amazon Web Services resources are not deleted. These resources may continue to incur costs.
    ///
    /// Parameters:
    ///   - clientToken:  This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.  A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment deletion request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
    ///   - environmentId: A unique ID associated with the environment to be deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteEnvironment(
        clientToken: String? = DeleteEnvironmentRequest.idempotencyToken(),
        environmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteEnvironmentResponse {
        let input = DeleteEnvironmentRequest(
            clientToken: clientToken, 
            environmentId: environmentId
        )
        return try await self.deleteEnvironment(input, logger: logger)
    }

    /// Deletes a host from an Amazon EVS environment.  Before deleting a host, you must unassign and decommission the host from within the SDDC Manager user interface. Not doing so could impact the availability of your virtual machines or result in data loss.
    @Sendable
    @inlinable
    public func deleteEnvironmentHost(_ input: DeleteEnvironmentHostRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteEnvironmentHostResponse {
        try await self.client.execute(
            operation: "DeleteEnvironmentHost", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a host from an Amazon EVS environment.  Before deleting a host, you must unassign and decommission the host from within the SDDC Manager user interface. Not doing so could impact the availability of your virtual machines or result in data loss.
    ///
    /// Parameters:
    ///   - clientToken:  This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.  A unique, case-sensitive identifier that you provide to ensure the idempotency of the host deletion request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
    ///   - environmentId: A unique ID for the host's environment.
    ///   - hostName: The DNS hostname associated with the host to be deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteEnvironmentHost(
        clientToken: String? = DeleteEnvironmentHostRequest.idempotencyToken(),
        environmentId: String,
        hostName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteEnvironmentHostResponse {
        let input = DeleteEnvironmentHostRequest(
            clientToken: clientToken, 
            environmentId: environmentId, 
            hostName: hostName
        )
        return try await self.deleteEnvironmentHost(input, logger: logger)
    }

    /// Returns a description of the specified environment.
    @Sendable
    @inlinable
    public func getEnvironment(_ input: GetEnvironmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetEnvironmentResponse {
        try await self.client.execute(
            operation: "GetEnvironment", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a description of the specified environment.
    ///
    /// Parameters:
    ///   - environmentId: A unique ID for the environment.
    ///   - logger: Logger use during operation
    @inlinable
    public func getEnvironment(
        environmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetEnvironmentResponse {
        let input = GetEnvironmentRequest(
            environmentId: environmentId
        )
        return try await self.getEnvironment(input, logger: logger)
    }

    /// List the hosts within an environment.
    @Sendable
    @inlinable
    public func listEnvironmentHosts(_ input: ListEnvironmentHostsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEnvironmentHostsResponse {
        try await self.client.execute(
            operation: "ListEnvironmentHosts", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List the hosts within an environment.
    ///
    /// Parameters:
    ///   - environmentId: A unique ID for the environment.
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - nextToken: A unique pagination token for each page. If nextToken is returned, there are more results available. Make the call again using the returned token with all other arguments unchanged to retrieve the next page. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEnvironmentHosts(
        environmentId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEnvironmentHostsResponse {
        let input = ListEnvironmentHostsRequest(
            environmentId: environmentId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEnvironmentHosts(input, logger: logger)
    }

    /// Lists environment VLANs that are associated with the specified environment.
    @Sendable
    @inlinable
    public func listEnvironmentVlans(_ input: ListEnvironmentVlansRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEnvironmentVlansResponse {
        try await self.client.execute(
            operation: "ListEnvironmentVlans", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists environment VLANs that are associated with the specified environment.
    ///
    /// Parameters:
    ///   - environmentId: A unique ID for the environment.
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - nextToken: A unique pagination token for each page. If nextToken is returned, there are more results available. Make the call again using the returned token with all other arguments unchanged to retrieve the next page. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEnvironmentVlans(
        environmentId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEnvironmentVlansResponse {
        let input = ListEnvironmentVlansRequest(
            environmentId: environmentId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEnvironmentVlans(input, logger: logger)
    }

    /// Lists the Amazon EVS environments in your Amazon Web Services account in the specified Amazon Web Services Region.
    @Sendable
    @inlinable
    public func listEnvironments(_ input: ListEnvironmentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEnvironmentsResponse {
        try await self.client.execute(
            operation: "ListEnvironments", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the Amazon EVS environments in your Amazon Web Services account in the specified Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - nextToken: A unique pagination token for each page. If nextToken is returned, there are more results available. Make the call again using the returned token with all other arguments unchanged to retrieve the next page. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.
    ///   - state: The state of an environment. Used to filter response results to return only environments with the specified environmentState.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEnvironments(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        state: [EnvironmentState]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEnvironmentsResponse {
        let input = ListEnvironmentsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            state: state
        )
        return try await self.listEnvironments(input, logger: logger)
    }

    /// Lists the tags for an Amazon EVS resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags for an Amazon EVS resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) that identifies the resource to list tags for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Associates the specified tags to an Amazon EVS resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they aren't changed. When a resource is deleted, the tags associated with that resource are also deleted. Tags that you create for Amazon EVS resources don't propagate to any other resources associated with the environment. For example, if you tag an environment with this operation, that tag doesn't automatically propagate to the VLAN subnets and hosts associated with the environment.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates the specified tags to an Amazon EVS resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they aren't changed. When a resource is deleted, the tags associated with that resource are also deleted. Tags that you create for Amazon EVS resources don't propagate to any other resources associated with the environment. For example, if you tag an environment with this operation, that tag doesn't automatically propagate to the VLAN subnets and hosts associated with the environment.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource to add tags to.
    ///   - tags: Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other environment or Amazon Web Services resources.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Deletes specified tags from an Amazon EVS resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes specified tags from an Amazon EVS resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource to delete tags from.
    ///   - tagKeys: The keys of the tags to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }
}

extension Evs {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Evs, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Evs {
    /// Return PaginatorSequence for operation ``listEnvironmentHosts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentHostsPaginator(
        _ input: ListEnvironmentHostsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEnvironmentHostsRequest, ListEnvironmentHostsResponse> {
        return .init(
            input: input,
            command: self.listEnvironmentHosts,
            inputKey: \ListEnvironmentHostsRequest.nextToken,
            outputKey: \ListEnvironmentHostsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEnvironmentHosts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - environmentId: A unique ID for the environment.
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentHostsPaginator(
        environmentId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEnvironmentHostsRequest, ListEnvironmentHostsResponse> {
        let input = ListEnvironmentHostsRequest(
            environmentId: environmentId, 
            maxResults: maxResults
        )
        return self.listEnvironmentHostsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listEnvironmentVlans(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentVlansPaginator(
        _ input: ListEnvironmentVlansRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEnvironmentVlansRequest, ListEnvironmentVlansResponse> {
        return .init(
            input: input,
            command: self.listEnvironmentVlans,
            inputKey: \ListEnvironmentVlansRequest.nextToken,
            outputKey: \ListEnvironmentVlansResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEnvironmentVlans(_:logger:)``.
    ///
    /// - Parameters:
    ///   - environmentId: A unique ID for the environment.
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentVlansPaginator(
        environmentId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEnvironmentVlansRequest, ListEnvironmentVlansResponse> {
        let input = ListEnvironmentVlansRequest(
            environmentId: environmentId, 
            maxResults: maxResults
        )
        return self.listEnvironmentVlansPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listEnvironments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentsPaginator(
        _ input: ListEnvironmentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEnvironmentsRequest, ListEnvironmentsResponse> {
        return .init(
            input: input,
            command: self.listEnvironments,
            inputKey: \ListEnvironmentsRequest.nextToken,
            outputKey: \ListEnvironmentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEnvironments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.
    ///   - state: The state of an environment. Used to filter response results to return only environments with the specified environmentState.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEnvironmentsPaginator(
        maxResults: Int? = nil,
        state: [EnvironmentState]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEnvironmentsRequest, ListEnvironmentsResponse> {
        let input = ListEnvironmentsRequest(
            maxResults: maxResults, 
            state: state
        )
        return self.listEnvironmentsPaginator(input, logger: logger)
    }
}

extension Evs.ListEnvironmentHostsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Evs.ListEnvironmentHostsRequest {
        return .init(
            environmentId: self.environmentId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Evs.ListEnvironmentVlansRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Evs.ListEnvironmentVlansRequest {
        return .init(
            environmentId: self.environmentId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Evs.ListEnvironmentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Evs.ListEnvironmentsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            state: self.state
        )
    }
}
